@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;800&family=Barlow:wght@300;400;500;600&display=swap');

/* =========================================================
   VARIABLES Y BASE
   ========================================================= */
:root {
  /* Degradado de la portada: se define una vez y se reutiliza en varias secciones */
  --degradado-portada: linear-gradient(90deg, rgba(13,27,62,0.92) 45%, rgba(13,27,62,0.55) 100%);
  --navy: #0d1b3e;
  --navy-mid: #1a2d5a;
  --blue: #1e4db7;
  --blue-bright: #2563eb;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --white: #ffffff;
  --gray-light: #f1f5f9;
  --gray-mid: #94a3b8;
  --gray-dark: #475569;
  --text: #1e293b;
  --shadow: 0 4px 24px rgba(13,27,62,0.13);
  --shadow-lg: 0 12px 40px rgba(13,27,62,0.22);
  --nav-h: 56px;
  --pad-x: max(clamp(20px, 5vw, 80px), calc((100vw - 1280px) / 2));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: var(--nav-h);
}

body {
  font-family: 'Barlow', sans-serif;
  color: var(--text);
  background: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

main { flex: 1; min-width: 0; overflow-x: clip; }

img { max-width: 100%; }

/* =========================================================
   NAVEGACIÓN
   ========================================================= */
nav {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-logo a { display: block; cursor: pointer; }

.nav-logo img {
  height: 280px;
  display: block;
  transform: rotate(90deg);
  transform-origin: center;
  color: white;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s;
  letter-spacing: 0.4px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-links a.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Barra de progreso */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  z-index: 200;
}

/* =========================================================
   BOTONES COMPARTIDOS
   ========================================================= */
.btn-primary {
  background: var(--blue-bright);
  color: var(--white);
  border: none;
  padding: 11px 26px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: var(--blue);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
  padding: 9px 24px;
  border-radius: 6px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
}

/* =========================================================
   ANIMACIÓN DE APARICIÓN AL HACER SCROLL
   (solo se activa si JavaScript está funcionando)
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: none;
}

/* =========================================================
   INICIO
   ========================================================= */
.hero {
  min-height: 420px;
  background: var(--degradado-portada),
              url() center/cover no-repeat;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 60px var(--pad-x);
}

.hero-content {
  flex: 1 1 340px;
  max-width: 520px;
  animation: fadeUp 0.7s ease both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(37,99,235,0.25);
  border: 1px solid rgba(96,165,250,0.4);
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 14px;
}

.hero p {
  color: rgba(255,255,255,0.78);
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-flashcard {
  flex: 1 1 320px;
  width: 100%;
  max-width: 600px;
  height: clamp(200px, 30vw, 300px);
  padding: 2px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.hero-flashcard img {
  width: 160%;
  height: 160%;
  transform: rotate(90deg);
}

.features-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 22px var(--pad-x);
  display: flex;
  gap: 24px 50px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0d1b3e;
}

.feature-text span {
  font-size: 0.76rem;
  color: #374151;
}

/* =========================================================
   NOSOTROS
   ========================================================= */
.about-section {
  padding: 70px var(--pad-x);
  background: linear-gradient(180deg, #ffffff 0%, var(--gray-light) 100%);
  color: #374151;
}

.about-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 36px;
  letter-spacing: 0.5px;
  text-align: left;
}

/* Barra de color bajo el título */
.about-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.about-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;          /* la foto ocupa toda la altura del texto */
  margin-bottom: 40px;
}

.about-image {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(13,27,62,0.22);
  min-height: 280px;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.about-image:hover img { transform: scale(1.04); }

.about-intro {
  padding: 30px 32px;
  background: #ffffff;
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  box-shadow: 0 8px 26px rgba(13,27,62,0.10);
  color: #374151;
}

.about-intro .eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.about-intro h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  line-height: 1.3;
}

.about-intro p {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.75;
  text-align: left;
}

.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.mv-card {
  border-left: 4px solid var(--accent);
  padding: 26px 28px;
  background: #f3f4f6;
  border-radius: 0 14px 14px 0;
  box-shadow: 0 6px 20px rgba(13,27,62,0.10);
  color: #374151;
}

.mv-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.mv-card p {
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.7;
  text-align: left;
}

.values-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.value-chip {
  display: flex;
  flex-direction: column;
  width: min(300px, 100%);
  height: 350px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  background: #fff;
  padding-top: 0;
  text-decoration: none;
  color: inherit;
}

.value-chip { cursor: default; transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s ease; }

.value-text {
  /* Franja con el degradado de la portada a todo el ancho, letras blancas en negrita */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 4.6rem;            /* las 3 franjas miden lo mismo aunque el título ocupe 2 líneas */
  margin: 0;
  padding: 12px 14px;
  background: var(--degradado-portada), #ffffff;   /* mismo degradado que la portada */
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.1;
  text-align: center;
}

.value-chip img {
  width: 100%;
  flex-grow: 1;
  min-height: 0;
  object-fit: cover;
  display: block;
}

/* =========================================================
   SONIDO E ILUMINACIÓN
   ========================================================= */
.portfolio-section {
  padding: 60px var(--pad-x);
  background: #ffffff;
}

.portfolio-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 24px;
}

.filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 20px;
  border-radius: 8px;
  border: none;
  font-family: 'Barlow', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
}

.tab-btn.active {
  background: var(--blue-bright);
  color: white;
  box-shadow: 0 6px 18px rgba(37,99,235,0.35);
}

.tab-btn:not(.active) {
  background: var(--gray-light);
  color: var(--gray-dark);
}

.tab-btn:not(.active):hover {
  background: #dbeafe;
  color: var(--blue);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(13,27,62,0.12);
  animation: fadeUp 0.5s ease backwards;
  background: white;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(13,27,62,0.18);
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.10s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.20s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.30s; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  transition: all 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(13,27,62,0.85), transparent);
  padding: 28px 16px 14px;
  transform: translateY(12px);
  opacity: 0.9;
  transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
  opacity: 1;
}

.gallery-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: white;
  letter-spacing: 0.3px;
}

.gallery-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  color: #0d1b3e;
  padding: 16px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
  z-index: 2;
  border-top: 1px solid #e5e7eb;
  border-radius: 0 0 14px 14px;
  text-align: justify;
  max-height: 100%;
  overflow-y: auto;
}

.gallery-item.active .gallery-info {
  transform: translateY(0);
}

.gallery-info p {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.gallery-info ul {
  font-size: 0.8rem;
  margin-bottom: 12px;
  padding-left: 16px;
}

/* ---- Tarjetas más atractivas ---- */
.gallery-item {
  --mx: 50%;
  --my: 50%;
  border: 1px solid #e2e8f0;
}

.gallery-item:hover {
  border-color: var(--accent-light);
  box-shadow: 0 16px 36px rgba(37,99,235,0.22);
}

/* Brillo que sigue al ratón */
.gallery-item::after,
.value-chip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(96,165,250,0.28), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 3;
}

.gallery-item:hover::after,
.value-chip:hover::after { opacity: 1; }

.gallery-item.active::after { opacity: 0; }

/* Indicador "Ver ficha" */
.gallery-item::before {
  content: "+ Ver ficha";
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
  background: var(--navy);
  color: white;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.3px;
  opacity: 0.88;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.gallery-item:hover::before {
  background: var(--blue-bright);
  opacity: 1;
}

.gallery-item.active::before {
  content: "× Cerrar";
  background: var(--blue-bright);
}

.gallery-item.active img {
  transform: scale(0.92) translateY(-8%);
}

.gallery-info li::marker { color: var(--accent); }

/* Tarjetas de "Nosotros" */
.value-chip {
  position: relative;
  border: 1px solid #e2e8f0;
}

.value-chip:hover {
  box-shadow: 0 16px 36px rgba(37,99,235,0.22);
  border-color: var(--accent-light);
}

.value-chip img { transition: transform 0.5s ease; }

/* Muestra la imagen entera, sin recortar */
.value-chip img.img-contain {
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  padding: 6px 12px 12px;
}
.value-chip:hover img { transform: scale(1.08); }

.value-text { position: relative; }
.value-text::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  background: #ffffff;
  border-radius: 2px;
  margin: 6px auto 0;
  transition: width 0.35s ease;
}
.value-chip:hover .value-text::after { width: 60px; }

.mv-card {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-left-width 0.25s ease;
}
.mv-card:hover {
  border-left-width: 8px;
  background: #eaf1fe;
  box-shadow: 0 14px 32px rgba(37,99,235,0.22);
}

/* .reveal fija transform:none con más especificidad, de ahí el selector largo */
.js .mv-card.reveal.visible:hover { transform: translateY(-4px); }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact-section {
  padding: 60px var(--pad-x);
  background: var(--gray-light);
}

.contact-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 30px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}

.map-container {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16/9;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 10px 30px rgba(13,27,62,0.18);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.info-item {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border-left: 4px solid var(--accent);
  border-radius: 0 14px 14px 0;
  padding: 18px 22px;
  box-shadow: 0 6px 20px rgba(13,27,62,0.12);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-left-width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

a.info-item:hover {
  border-left-width: 8px;
  background: #f5f9ff;
  box-shadow: 0 14px 34px rgba(37,99,235,0.40);
}

/* .reveal fija transform:none con más especificidad, por eso este selector largo */
.js .info-item.reveal.visible:hover { transform: translateX(6px); }

.info-text { min-width: 0; }

.info-text strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 1rem;
  color: var(--navy);
}

.info-text span {
  font-size: 0.85rem;
  color: var(--gray-dark);
}

.horario {
  width: 100%;
  max-width: 420px;
  cursor: default;
}

.info-icon {
  width: 52px;
  height: 52px;
  background: #eaf1fe;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon img {
  width: 34px;
  height: 34px;
  mix-blend-mode: multiply;                  /* quita el fondo blanco de los logos .jpg */
  object-fit: contain;
  display: block;
}

/* ----- Contacto: detalles y animaciones de las tarjetas ----- */

/* Brillo que cruza la tarjeta al pasar el ratón */
.info-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(96,165,250,0.28) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
a.info-item:hover::before { transform: translateX(100%); }

/* Flecha que aparece en las tarjetas que son enlaces */
a.info-item::after {
  content: "→";
  margin-left: auto;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--blue-bright);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
a.info-item:hover::after { opacity: 1; transform: translateX(0); }

/* Icono: cuadro azul claro que gira y crece al pasar el ratón */
.info-icon {
  position: relative;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,0.15);
}
a.info-item:hover .info-icon { transform: scale(1.12) rotate(-6deg); background: #dbeafe; }
a.info-item:hover .info-text strong { color: var(--blue-bright); }

/* Onda que late alrededor del teléfono */
a.info-item[href^="tel:"] .info-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 2px solid var(--accent);
  animation: ring-pulse 2.4s ease-out infinite;
}
@keyframes ring-pulse {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Entrada escalonada desde la izquierda */
@keyframes info-in {
  from { opacity: 0; transform: translateX(-30px); }
}
.js .info-item.reveal.visible { animation: info-in 0.6s ease backwards; }
.contact-left .info-item:nth-child(2) { animation-delay: 0.12s !important; }
.contact-left .info-item:nth-child(3) { animation-delay: 0.24s !important; }
.horario { animation-delay: 0.2s !important; }

/* Barra de color bajo el título y mapa que se eleva */
.contact-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}
.map-container { transition: box-shadow 0.3s ease, transform 0.3s ease; }
.map-container:hover { box-shadow: 0 18px 44px rgba(13,27,62,0.28); }
.js .map-container.reveal.visible:hover { transform: translateY(-4px); }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 20px 40px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

/* Botón volver arriba */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue-bright);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37,99,235,0.4);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.3s ease;
  z-index: 90;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  background: var(--blue);
}

/* =========================================================
   ANIMACIONES
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Portátil pequeño / tablet horizontal */
@media (max-width: 1024px) {
  .about-top { grid-template-columns: 1fr; gap: 30px; }
  .mv-grid { grid-template-columns: 1fr; }
  .hero { gap: 30px; }
}

/* Menú hamburguesa (tablet y móvil) */
@media (max-width: 1000px) {
  nav { padding: 0 max(20px, env(safe-area-inset-left)); }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.open {
    max-height: 420px;
    padding: 8px 20px 16px;
  }

  .nav-links a {
    display: block;
    padding: 14px 12px;
    font-size: 0.95rem;
  }
}

/* Tablet vertical y móvil grande */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    padding: 40px 20px;
    text-align: left;
  }

  .hero-content { flex: none; max-width: 100%; width: 100%; }

  .hero-actions .btn-primary,
  .hero-actions .btn-outline {
    flex: 1 1 100%;
    text-align: center;
  }

  .hero-flashcard {
    flex: none;
    width: 220px;
    height: 140px;
  }

  .hero-flashcard img {
    width: 140px;
    height: 140px;
    transform: rotate(0deg);
  }

  .features-bar {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }

  .about-section,
  .contact-section { padding-block: 40px; }

  .about-intro p,
  .mv-card p,
  .gallery-info { text-align: left; }

  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-right { align-items: stretch; }
  .map-container,
  .horario { max-width: 100%; }

  .portfolio-section { padding-block: 40px; }
  .gallery-grid { gap: 16px; }

  .tab-btn { padding: 10px 18px; }
  .value-chip { height: 320px; }
}

/* Móvil */
@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { aspect-ratio: 1 / 1; }

  .tab-btn { font-size: 0.8rem; padding: 10px 14px; flex: 1 1 auto; text-align: center; }

  .map-container { aspect-ratio: 4 / 3; }

  .info-item { padding: 14px 16px; }

  footer { padding: 18px 20px; text-align: center; }

  .back-to-top {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 42px;
    height: 42px;
  }
}

/* Pantallas táctiles: sin efectos "hover" que se quedan pegados */
@media (hover: none) {
  .gallery-item:hover,
  .value-chip:hover { transform: none; }

  .gallery-item:hover::after,
  .value-chip:hover::after { opacity: 0; }

  .gallery-item:hover img { transform: none; }
  .value-chip:hover img { transform: none; }

  .gallery-overlay { transform: none; opacity: 1; }
}

/* Móvil en horizontal (poca altura) */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: 0; padding-block: 30px; }
  .nav-links.open { max-height: calc(100vh - var(--nav-h)); overflow-y: auto; }
}

/* Respeta a quien tiene desactivadas las animaciones */
@media (prefers-reduced-motion: reduce) {
  .info-item::before, a.info-item[href^="tel:"] .info-icon::after { display: none; }
  .js .info-item.reveal.visible { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
